<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>证书添加</title>
        <meta name="keywords" content=""/>
        <meta name="description" content=""/>
        <meta http-equiv="X-UA-Compatible" content="IE=7"/>
        <link rel="stylesheet" type="text/css" href="css/reset.css" />
        <link rel="stylesheet" type="text/css" href="css/myresume.css" />
    </head>
    <body>
        <div id="interactive-box" class="dialog" style="min-width: 770px; z-index: 99999; left: 247px; top: 552px; width: auto;">
            <div class="top">
                <div class="corner"></div>
            </div>
            <div class="body">
                <div class="client">
                    <form method="post" action="?c=MyResume&a=CertAdd">
                        <input type="hidden" value="<?= $uid ?>" name="userid">
                        <input type="hidden" value="<?= $id ?>"name="id" />
                        <div class="dialog-content picksection" id="cert-dialog-content">

                            <div id="cert-dialog-content-pickarea">
                                <div style="display: none;" id="cert-dialog-selected">
                                    <h2>已选择: </h2>
                                    <ul style="width:692px" class="selected clearfix"></ul>
                                </div>
                                <div class="pool">
                                    <?php
                                    foreach ($cert['sort'] as $sid => $sname) {
                                    ?>
                                        <h3 style="margin-top:8px;" class="b"><?= $sname ?>:</h3>
                                    <?php
                                        $index = 1;
                                        foreach ($cert['rank'][$sid] as $rid => $rname) {
                                            if ($index % 5 == 1) {
                                                echo '<div class="foldable">';
                                            }
                                            if(in_array($rid, $existDidArr)){
                                                echo '<span class="checkable"><input type="checkbox" id="wholeworld-q-cert-' . $rid . '-checkbox" name="certid[]" value="' . $rid . '" checked><label for="wholeworld-q-cert-' . $rid . '-checkbox" class="checkbox">' . $rname . '</label></span>';
                                            }else{
                                                echo '<span class="checkable"><input type="checkbox" id="wholeworld-q-cert-' . $rid . '-checkbox" name="certid[]" value="' . $rid . '"><label for="wholeworld-q-cert-' . $rid . '-checkbox" class="checkbox">' . $rname . '</label></span>';
                                            }
                                            

                                            if ($index % 5 == 0) {
                                                echo '</div>';
                                            }

                                            $index++;
                                        }
                                        
                                        if ($index % 5 != 1) {
                                                echo '</div>';
                                        }
                                    ?>
                                        <div class="clearfix"></div>
                                    <?php
                                    }
                                    echo '<div id="certgroup">';
                                    $index2 = 1;
                                    foreach ($cert['group'] as $gid => $gname) {
                                        if ($index2 % 5 == 1) {
                                            echo '<div class="foldable">';
                                        }
                                        echo '<span class="checkable close" id="' . $gid . '"><input type="checkbox" style="display:none" value=' . $gid . ' name="cert" id="wholeworld-cert-' . $gid . '-checkbox"><label class="checkbox" for="wholeworld-cert-'. $gid .'-checkbox">' . $gname . '</label></span>';

                                        if ($index2 % 5 == 0) {
                                            echo '</div>';
                                        }

                                        $index2++;
                                    }
                                    if ($index2 % 5 != 0) {
                                            echo '</div>';
                                    }
                                    
                                    foreach ($cert['groupmember'] as $group_m_k => $group_m_v) {
                                        echo '<div id="cert-'.$group_m_k.'" style="display:none" class="lowlevel clearfix">
                                                <ul class="clearfix">';
                                        foreach ($group_m_v as $gm_k => $gm_v) {
                                            echo '<li class="checkable"><input type="checkbox" id="wholeworld-cert-'.$gm_k.'-checkbox" value="'.$gm_k.'" name="certid[]" class="checkbox"><label for="wholeworld-cert-'.$gm_k.'-checkbox" class="checkbox">'.$gm_v.'</label> </li>';
                                        }
                                        echo '</ul>
                                            </div>';
                                    }

                                            ?>
                                        </div>
                                </div>
                            </div>
                        </div>
                        <div class="error">&nbsp;</div>
                        <div class="inputdiv_btn">
                            <button class="big-default" type="submit"><span><span>确定</span></span></button>
                            <button type="button" class="normal" onclick="self.parent.tb_remove()"><span><span>取消</span></span></button>
                        </div>
                        <div class="bottom"><div class="corner"></div></div>
                    </form>
                </div>
            </div>
        </div>
        <script language="javascript" src="js/jquery.js"></script>
        <script language="javascript" src="js/layeffect.js"></script>
    </body>
</html>
